import {
	baseUrl,
	token
} from "../utils/request.js"

export function getLoadList(param) {
	return uni.request({
		url: baseUrl + '/prod-api/system/researchInfo/list',
		header: {
			'Authorization': 'Bearer ' + token()
		},
		method: "GET",
		data: param
	});
}
export function getLoadDtile(param) {
	return uni.request({
		url: baseUrl + '/prod-api/system/researchInfo/' + param,
		header: {
			'Authorization': 'Bearer ' + token()
		},
		method: "GET"
	});
}
// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
	return uni.request({
		url: baseUrl + '/prod-api/system/dict/data/type/' + dictType,
		header: {
			'Authorization': 'Bearer ' + token()
		},
		method: 'get'
	})
}
export function selectDictLabel(datas, value) {
	var actions = [];
	Object.keys(datas).some((key) => {
		if (key == ('' + value)) {
			actions.push(datas[key].name);
			return true;
		}
	})
	return actions.join('');
}
